
package com.jf.cloud.supplier.service.impl;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.supplier.dto.AuditingSupplierInfoDTO;
import com.jf.cloud.supplier.mapper.SupplierAuditingMapper;
import com.jf.cloud.supplier.model.SupplierAuditing;
import com.jf.cloud.supplier.service.SupplierAuditingService;
import com.jf.cloud.supplier.vo.SupplierAuditingInfoVO;
import com.jf.cloud.supplier.vo.SupplierAuditingVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 供应商审核信息
 *
 * @author zz
 * @date 2022-03-14 17:04:32
 */
@Service
public class SupplierAuditingServiceImpl implements SupplierAuditingService {

    @Autowired
    private SupplierAuditingMapper supplierAuditingMapper;



    @Override
    public PageVO<SupplierAuditingVO> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> supplierAuditingMapper.list());
    }

    @Override
    public SupplierAuditingVO getBySupplierAuditingId(Long supplierAuditingId) {
        return supplierAuditingMapper.getBySupplierAuditingId(supplierAuditingId);
    }

    @Override
    public void save(SupplierAuditing supplierAuditing) {
        supplierAuditingMapper.save(supplierAuditing);
    }

    @Override
    public void update(SupplierAuditing supplierAuditing) {
        supplierAuditingMapper.update(supplierAuditing);
    }

    @Override
    public void deleteById(Long supplierAuditingId) {
        supplierAuditingMapper.deleteById(supplierAuditingId);
    }

    @Override
    public SupplierAuditingVO getBySupplierId(Long supplierId) {
        return supplierAuditingMapper.getBySupplierId(supplierId);
    }

    @Override
    public PageVO<SupplierAuditingInfoVO> auditingInfoPage(PageDTO pageDTO, AuditingSupplierInfoDTO auditingInfoDTO) {
        return PageUtil.doPage(pageDTO, () -> supplierAuditingMapper.auditingInfoList(auditingInfoDTO));
    }

}
